{% extends "dashboard/base.html" %}

{% block inline_css %}
{{block.super}}
{% include 'dashboard/api_key.css' %}
<style type="text/css">
</style>
{% endblock %}

{% block title %}
{{block.super}} &gt;
<a href="{% url 'dashboard_profile' %}">Edit Profile</a>
{% endblock %}
{% block dashboard_content %}
<form method="post" action="{% url 'save_profile' %}">
{% csrf_token %}
<table class="settings_table">
<tr>
    <td class="leftcolumn" style="border:0px">
        <div class="setting_title">Display Name:</div>
        <div class="setting_description">
        </div>
    </td>
    <td style="border:0px">
        {{ profile_form.display_name }} {{ profile_form.display_name.errors }}
    </td>
</tr>
<tr>
    <td class="leftcolumn">
        <div class="setting_title">Default License:</div>
        <div class="setting_description">
            You can set a default license that will govern any new submissions you upload (unless otherwise specified in the upload form).
            <br /><br />

            Your current default license is
            {% include 'license/license_link.html' with license=profile.default_license %}.
            <br /><br />

            The 'use default' option refers to the site-wide default license, which is 
            {% include 'license/license_link.html' with license=site_default_license %}.
        </div>
    </td>
    <td>
        <b>Allow commercial use?</b><br />
        {{ license_form.allow_commercial_use }}
        {{ license_form.allow_commercial_use.errors }}
        <br /><br />
        <b>Allow modifications?</b><br />
        {{ license_form.allow_modifications.errors }}
        {{ license_form.allow_modifications }}
    </td>
</tr>
<tr>
    <td class="leftcolumn">
        <div class="setting_title">Default Visibility:</div>
        <div class="setting_description">
          You can set a default for the Visibily option for new submissions you upload.
	  <br/><br/>
	  This determines whether other people can see your images and results.
        </div>
    </td>
    <td>
        <b>Default Publicly Visible setting</b>
        {{ profile_form.default_publicly_visible }}
        {{ profile_form.default_publicly_visible.errors }}
    </td>
</tr>
</table>
<br />
<div style="text-align:center">
    <input type="submit" value="Update Profile" class="bigbutton" />
</div>
</form>
{% endblock %}
